
# Now generate the configure file
#CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)


# Add the root of the binary distribution to the include directories !
# Do it in order to fetch config.h, however, we may generate config.h in the
# src directory.
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})

SET(libabf_cpp_SRCS
  src/abf_flat.cpp
  src/abf_format.cpp
)

SET(libabf_cpp_HEADERS
  src/abf.hpp
  src/abf_flat.hpp
  src/abf_format.hpp
)

INCLUDE_DIRECTORIES(${LIBABF_INCLUDE_DIR})

ADD_LIBRARY(abf_cpp SHARED ${libabf_cpp_SRCS})
TARGET_LINK_LIBRARIES(abf_cpp -labf)
SET_TARGET_PROPERTIES(abf_cpp PROPERTIES
   VERSION ${ABF_VERSION}
   SOVERSION ${ABF_VERSION}
   CLEAN_DIRECT_OUTPUT 1
   OUTPUT_NAME abf_cpp)

INSTALL(TARGETS abf_cpp LIBRARY DESTINATION lib)
INSTALL(FILES ${libabf_cpp_HEADERS} DESTINATION include/abf)
